home *** CD-ROM | disk | FTP | other *** search
- Path: elroy.jpl.nasa.gov!decwrl!purdue!yuma!steffend
- From: steffend@lamar.colostate.edu (Dave Steffen)
- Newsgroups: comp.lang.c++
- Subject: Re: scientific c++ standard template library (vector & matrx)
- Date: 23 Mar 1996 00:51:19 GMT
- Organization: Colorado State University, Fort Collins, CO 80523
- Message-ID: <4ivhu7$1ncg@yuma.ACNS.ColoState.EDU>
- References: <4isep1$agc@newshost.lanl.gov>
- NNTP-Posting-Host: glitch.physics.colostate.edu
- X-Newsreader: TIN [version 1.2 PL2]
-
- Liang Lu (llu) wrote:
-
- > I am looking for a scientific c++ standard template library (vector
- > & matrx) including vector and matrix operations such as addition,
- > subtruction, multiplication and etc. Please send me an email if you
- > have information.
- > -
- > Best Regards,
-
- > Liang
-
- I'd steer you in several possible directions... all at the
- same time. ;-)
-
- A) First off, the STL has some kind of vector classes, I believe; I
- don't know beans about the STL but it might be worth a look.
-
- B) Barton and Nackman have an excellent book out called... damn, can't
- get the name right now. Really good book, they do quite a bit with
- vector and matrix classes, I think they're wrapping Fortran LAPACK
- routines. One potential problem: they make EXTENSIVE use of exceptions
- and templates, so your compiler may very well give you the finger if
- it's not up to snuff (I use g++ 2.7.0, great compiler but very likely
- would barf on their code - that's a guess.)
-
- C) LAPACK++ has been around for a while, I don't know what state it's
- in right now. A while back I was looking what you're after, but
- decided against LAPACK++ for three reasons:
-
- a) I didn't like using () for matrix and vector indices. My
- code was (at the time) going to be using old-fashioned "C" arrays too,
- and I didn't want to have to keep track of what needed [] and what
- needed () to access an element.
-
- b) At the time LAPACK++ didn't implement the routines for
- Hermitian matrices (or complex matrices at all) as far as I could
- tell. As that was the only kind of matrix I was using (quantum
- mechanics and all that) LAPACK++ wouldn't have helped me anyway.
-
- c) I couldn't get it to compile! ;-) YMMV.
-
- ... so I ended up doing it myself. At this point I've got
- templated vectors, matrices, and 3rd-rank tensors. They use the
- occasional LAPACK call for multiplication and the like, and they're
- pretty fast; the profiler tells me my code is spending >70% of its
- time actually _in_ the LAPACK routines. I only needed five or six
- LAPACK routines so the thing didn't take that much work to get
- running.
-
- Anyway, hope that helps.
-
- /\
- \/
-
- Dave Steffen No, his mind is not for rent
- Dept. of Physics To any God or Government
- Colorado State University Always hopeful, yet discontent
- steffend@lamar.colostate edu He knows changes aren't permanent-
- But change is...
- "Speak softly...
- ... and carry a black belt!" -Neal Peart / RUSH
- -----------------------------------------------------------------------
-
-
-
-